<template>
  <div class="chaoren" ref="chaoren"></div>
</template>

<script>
export default {
  name: "Chaoren",
  data() {
    return {
      n: 0,
    };
  },
  mounted() {
    let step = 0;
    let chaoren = this.$refs.chaoren;
    setInterval(() => {
        step++;
      if (step > 3) step = 0;
      let p = -step * 25 + "px" + " " + "-76px";
      chaoren.style.backgroundPosition  =p
      
    }, 100);
  },
};
</script>

<style lang="scss" scoped>
.chaoren {
  position: fixed;
  width: 25px;
  height: 38px;
  background: url(./1.png);
  z-index: 3000;
  background-position: 0 -76px;
  top:10px;
  left:100px;
}
</style>